<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/3/5
 * Time: 00:40
 */

namespace App\Http\Controllers\MiniProgram;

use App\Http\Traits\DianBoTrait;
use Qcloud_video\Video;
use App\Http\Controllers\BaseController;
class WeiController extends BaseController
{
    use DianBoTrait;
    public function getSig()
    {
        $srcPath = storage_path().'/app/'.$this->video_file;
        $bucketName = 'video';
        $dstPath = '/test.mp4';
        $coverUrl = 'http://video-1253709024.cossh.myqcloud.com/2018-03-04-eed911.mp4.0_0.p0.jpg';
        // 上传文件
        $uploadRet = Video::upload($srcPath, $bucketName,$dstPath, $coverUrl);
        var_dump($uploadRet);
    }
}